﻿@using CleanArchitecture.Infrastructure.Entities;
@using CleanArchitecture.Infrastructure.Models.Business.Columns;
@using CleanArchitecture.Infrastructure.Entities.Settings;
@using CleanArchitecture.Web.FrontendUI;
@inject CleanArchitecture.Infrastructure.Interfaces.Business.ILanguageService languageService
@inject CleanArchitecture.Infrastructure.Interfaces.IWorkContext workContext
@inject CleanArchitecture.Infrastructure.Interfaces.ISettingService settingService
@model CleanArchitecture.Infrastructure.Models.Business.News.NewsItemModel
@{ 
    ClientSiteSettings clientSettingsModel = clientSettingsModel = settingService.LoadSetting<ClientSitePCSettings>();
    IList<ColumnItemModel> AllColumns = ViewBag.AllColumns as List<ColumnItemModel> ?? null;
    ColumnItemModel CurrentColumn = ViewBag.CurrentColumn as ColumnItemModel ?? null;
}
<!DOCTYPE html>
<html lang="@languageService.GetTwoLetterIsoLanguageName(workContext.WorkingLanguage)">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@Html.NowaTitle(EntityEnumConfig.DataType.ClientPC, CurrentColumn, Model)</title>
    <meta name="description" content="@(Html.NowaMetaDescription(EntityEnumConfig.DataType.ClientPC, CurrentColumn, Model))" />
    <meta name="keywords" content="@(Html.NowaMetaKeywords(EntityEnumConfig.DataType.ClientPC, CurrentColumn, Model))" />
    <link rel="shortcut icon" href="~/favicon.ico" />
    <link rel="bookmark" href="~/favicon.ico" />
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    @Html.FrontendCssFiles(new List<string>
        {
            "~/frontend/css/ljs.css",
            "~/frontend/css/style.css",
            "~/frontend/css/active.css",
            "~/frontend/css/common.css",
            "~/frontend/css/animate.min.css"
        })
    @await RenderSectionAsync("csslinks", required: false).ConfigureAwait(false)
    @await RenderSectionAsync("cssstyles", required: false).ConfigureAwait(false)
</head>
<body>


    @RenderBody()

    <environment names="Development">
        <script src="~/lib/fetch/fetch.js" type="module" asp-append-version="true"></script>
        <script src="~/lib/jquery/dist/jquery.js" asp-append-version="true"></script>
        <script src="~/lib/layui/layui.js" asp-append-version="true"></script>
        <script src="~/js/util.js" asp-append-version="true"></script>
        <script src="~/lib/lodash/lodash.js" asp-append-version="true"></script>
        <script src="~/lib/vue/vue.js" asp-append-version="true"></script>
    </environment>
    <environment names="Staging,Production">
        <script src="~/lib/fetch/fetch.min.js" type="module" asp-append-version="true"></script>
        <script src="~/lib/jquery/dist/jquery.min.js" asp-append-version="true"></script>
        <script src="~/lib/layui/layui.js" asp-append-version="true"></script>
        <script src="~/js/util.min.js" asp-append-version="true"></script>
        <script src="~/lib/lodash/lodash.min.js" asp-append-version="true"></script>
        <script src="~/lib/vue/vue.min.js" asp-append-version="true"></script>
    </environment>

    @Html.FrontendScripts(new List<string>
        {
            "~/frontend/js/effect/index.js",
            "~/frontend/js/common.js",
            "~/frontend/jquery.SuperSlide.2.1.1.js",
            "~/frontend/wow.min.js",
        })
    @await RenderSectionAsync("scripts", required: false).ConfigureAwait(false)
    <script type="text/javascript">
        $(document).ready(function () {
            if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) {
                var wow = new WOW({
                    boxClass: 'wow',
                    animateClass: 'animated',
                    offset: 0,
                    mobile: true,
                    live: true
                });
                wow.init();
            };
        });
    </script>
</body>
</html>
